let one:number = 1112;

//函数参数解构
function example(){
    return [1,2,3];
}

var [a,b,c] = example();

console.info([a,b,c]);

//箭头函数

let f = () => 5;
let fs = v => v;

console.info(f());

function Person(){
    this.age = 0;
  
    setInterval(() => {
      this.age++; // |this| 正确地指向person 对象
    }, 1000);
  }
  
  var p = new Person();
  console.log(p)

  //class的基本用法
  class Point{
      constructor(x,y){
          this.x = x;
          this.y = y;
      }

      toString(){
          return '('+this.x+','+this.y+')';
      }
  }
  var ts = new Point(1,2);
  console.info(ts.toString());
  console.info(Point.name);

  